using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DebugShowVelocity : MonoBehaviour
{
    private Rigidbody rb;

    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody>();
        StartCoroutine(ShowVelocityEverySeconds());
    }

    // Update is called once per frame
    void Update()
    {
    }

    IEnumerator ShowVelocityEverySeconds() {
        while (true)
        {
            yield return new WaitForSeconds(1);
            if (rb)
            {
                Debug.Log($"rb.angularVelocity:{rb.angularVelocity}");
            }
        }
    }
}
